//
//  RGMainPageRouter.m
//  RedGrass
//
//  Created by wukong on 2019/1/28.
//  Copyright © 2019年 hongcaosp. All rights reserved.
//

#import "RGMainPageRouter.h"
#import "RGChatViewController.h"
#import "RGPersonalPageVC.h"
#import "DIYScanViewController.h"
#import "RGSearchViewController.h"

@implementation RGMainPageRouter

+(void) pushToLoginWithPassViewControllerFromVC:(UIViewController *)vc userId:(NSInteger)userId toUserId:(NSInteger)toUserId nickName:(nonnull NSString *)nickName{
    
    RGChatViewController *chatVc = [[RGChatViewController alloc]init];
    chatVc.userId = userId;
    chatVc.toUserId = toUserId;
    chatVc.nickName = SafeStr(nickName);
    chatVc.hidesBottomBarWhenPushed = YES;
    [vc.navigationController pushViewController:chatVc animated:YES];
}

+(void) pushToPersonInfoViewControllerFromVC:(UIViewController *)vc userId:(NSInteger)userId meFollowTa:(BOOL)meFollowTa nickName:(nonnull NSString *)nickName focusChangedBlock:(nonnull void (^)(BOOL))focusChangedBlock{
    RGPersonalPageVC *personalVc = [[RGPersonalPageVC alloc]init];
    personalVc.userId = userId;
    personalVc.meFollowmTa = meFollowTa;
    personalVc.nickName = SafeStr(nickName);
    personalVc.focuStatusChangedBlock = focusChangedBlock;
    personalVc.hidesBottomBarWhenPushed = YES;
    [vc.navigationController pushViewController:personalVc animated:YES];
}

+(void)pushToQRcodeScanViewControllerFromVC:(UIViewController *)vc{
    DIYScanViewController *scanVc = [[DIYScanViewController alloc]init];
    scanVc.hidesBottomBarWhenPushed = YES;
    [vc.navigationController pushViewController:scanVc animated:YES];
}

+(void) pushToRGSearchViewControllerFromVC:(UIViewController *)vc{
    RGSearchViewController *searchVc = [[RGSearchViewController alloc]init];
    searchVc.hidesBottomBarWhenPushed = YES;
    [vc.navigationController pushViewController:searchVc animated:YES];
}

@end
